package com.ruoyi.business.service.impl;

import com.ruoyi.business.domain.WmsTransferRecord;
import com.ruoyi.business.mapper.WmsTransferRecordMapper;
import com.ruoyi.business.service.IWmsTransferRecordService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 调拨单明细Service业务层处理
 * 
 * @author sz
 * @date 2024-01-23
 */
@Service
public class WmsTransferRecordServiceImpl implements IWmsTransferRecordService
{
    @Autowired
    private WmsTransferRecordMapper wmsTransferRecordMapper;

    /**
     * 查询调拨单明细
     * 
     * @param id 调拨单明细ID
     * @return 调拨单明细
     */
    @Override
    public WmsTransferRecord selectWmsTransferRecordById(Long id)
    {
        return wmsTransferRecordMapper.selectWmsTransferRecordById(id);
    }

    /**
     * 查询调拨单明细列表
     * 
     * @param wmsTransferRecord 调拨单明细
     * @return 调拨单明细
     */
    @Override
    public List<WmsTransferRecord> selectWmsTransferRecordList(WmsTransferRecord wmsTransferRecord)
    {
        return wmsTransferRecordMapper.selectWmsTransferRecordList(wmsTransferRecord);
    }

    /**
     * 新增调拨单明细
     * 
     * @param wmsTransferRecord 调拨单明细
     * @return 结果
     */
    @Override
    public int insertWmsTransferRecord(WmsTransferRecord wmsTransferRecord)
    {
        return wmsTransferRecordMapper.insertWmsTransferRecord(wmsTransferRecord);
    }

    /**
     * 修改调拨单明细
     * 
     * @param wmsTransferRecord 调拨单明细
     * @return 结果
     */
    @Override
    public int updateWmsTransferRecord(WmsTransferRecord wmsTransferRecord)
    {
        return wmsTransferRecordMapper.updateWmsTransferRecord(wmsTransferRecord);
    }

    /**
     * 删除调拨单明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWmsTransferRecordByIds(String ids)
    {
        return wmsTransferRecordMapper.deleteWmsTransferRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除调拨单明细信息
     * 
     * @param id 调拨单明细ID
     * @return 结果
     */
    @Override
    public int deleteWmsTransferRecordById(Long id)
    {
        return wmsTransferRecordMapper.deleteWmsTransferRecordById(id);
    }
}
